#include "Supervisor.h"
#include "hw/board.hpp"
#include "hw/timer9.h"
#include "messages.hpp"
#include "rotor-light.hpp"

using Queue = rl::Queue<Storage, 30>;
using Planner = rl::Planner<5>;

Supervisor sup;

int main() {
  hw::Board::init();
  hw::Board::enable_uart();
  hw::Timer9::init();
  hw::Board::toggle_led();

  Queue queue;
  Planner planner;
  rl::Context context{&queue, &planner, &hw::Board::get_now};
  sup.bind(context);
  sup.start(true);
  sup.process();

  return 0;
}
